<?php 
/* SVN FILE: $Id$ */
/* LineItem Test cases generated on: 2009-10-26 16:46:33 : 1256543193*/
App::import('Model', 'LineItem');

class LineItemTestCase extends CakeTestCase {
	var $LineItem = null;
	var $fixtures = array('app.line_item', 'app.product');

	function startTest() {
		$this->LineItem =& ClassRegistry::init('LineItem');
	}

	function testLineItemInstance() {
		$this->assertTrue(is_a($this->LineItem, 'LineItem'));
	}

	function testLineItemFind() {
		$this->LineItem->recursive = -1;
		$results = $this->LineItem->find('first');
		$this->assertTrue(!empty($results));

		$expected = array('LineItem' => array(
			'id'  => 1,
			'product_id'  => 1,
			'quantity'  => 1,
			'order_id' => 1,
			'unit_price'  => 1
		));
		#debug($results);
		$this->assertEqual($results, $expected);
	}
}
?>